package main

import (
	"flag"
	"mks/listener"
	"mks/sender"
)

var m int

var host string

func main() {
	//从命令行接受参数
	flag.IntVar(&m, "m", 0, "监听模式：0=无键盘监听端，1=有键盘发送端")
	flag.StringVar(&host, "host", "127.0.0.1:8888", "监听地址")
	flag.Parse()
	switch m {
	case 0:
		listener.StartClientServer()
	default:
		sender.ConnectToClient(host)

	}
}
